<html lang="">
    <include file="Common:new_doc_header"/>
    <link rel="stylesheet" href="{:base_url()}Public/newpage/index_index.css">
    <body>
        <div class="book with-header with-summary">
            <include file="Common:new_doc_head"/>
            <eq name="admin_user.edit_permission" value="1">
                <div class="container-hd">
                    <div class="fr addPro"><a href="javascript:;">添加项目</a></div>
                </div>
            </eq>
            <div class="container-bd">
                <!-- 其他功能 [[ -->
                <div class="data-box">
                    <div class="data-bd">
                        <div class="function1 clr">
                            <ul class="guide-main  clr  ">
                                <volist name="data" id="d">
                                    <li class="guide-main-li-5">
                                        <a href="{:U('Doc/index')}?proid={$d.proid}" target="_blank">
                                            <span class="guide-main-li-ico ico-clearance"></span>
                                            <h3 class="title">{$d.pro_name}</h3>
                                            <!-- <p class="info">银行服务商通过该API报备子商户给到微信支付</p> -->
                                            <span class="btngreen">查看文档</span>
                                        </a>
                                    </li>
                                </volist>
                            </ul>
                        </div>                          
                     </div>  
                </div>
                <!-- 其他功能 ]] -->
            </div>
            <script>
                    $('.addPro').click(function () {
                        layer.prompt({title: '输入项目名称', formType: 2}, function(pass, index){
                          layer.close(index);
                          var index = layer.load(0, {shade: false}); //0代表加载的风格，支持0-2
                          if(pass!=""){
                                $.post('{:U("Index/addpro")}',{pro_name:pass},function (ret) {
                                if(ret.status==200){
                                    window.location.reload();
                                }else{
                                    alert(ret.message);
                                }
                            },'json');
                          }else{
                            layer('必须填写');
                            return false;
                          }
                        }); 
                        return false;
                    });
            </script>
        </div>
    </body>
</html>